home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: natlab.research.philips.com!ijntema
- From: ijntema@natlab.research.philips.com (Hans IJntema)
- Subject: Re: Borland C++ 4.5 FLoating point error?
- Sender: news@natlab.research.philips.com (USENET News System)
- Message-ID: <ijntema.233.002A1385@natlab.research.philips.com>
- Date: Mon, 12 Feb 1996 08:09:08 GMT
- References: <4fj728$187a@news.doit.wisc.edu>
- Organization: Philips Research
- X-Newsreader: Trumpet for Windows [Version 1.0 Rev B]
-
- In article <4fj728$187a@news.doit.wisc.edu> cstelzer@students.wisc.edu (Christopher Stelzer) writes:
- >From: cstelzer@students.wisc.edu (Christopher Stelzer)
- >Subject: Borland C++ 4.5 FLoating point error?
- >Date: 10 Feb 1996 22:43:20 GMT
-
- >I have been having a problem inputing any number with decimals. I have been
- >using the "cin >>" command and have tried using "scanf". When I declare the
- >variable to be inputted as float, double or long I get a floating point
- >overflow error. Running turbo debugger over it, I find out it seems to be a
- >problem with my processor (100mhz pentium). Is the problem my processor? Is
- >there a programming fix? Has anyone else had this problem before?
- >Please reply directly to cstelzer@students.wisc.edu
-
- >thanx
- >chris stelzer
- >madison, wi
-
- This is documented in a FAQ, don't know which one...
-
- If you use floating points in scanf etc, (%f) and no floating points ops in
- the rest of the program, the linker does not link the floating point lib. Put
- somewhere in your program something like float a = 1.0/2.0;
-
-
-
-
- ___________________________________________________________________________
- Hans IJntema
- Philips Research
- Building WO-02
- Prof. Holstlaan 4
- 5656 AA Eindhoven
- The Netherlands
-
- e-mail: ijntema@natlab.research.philips.com
- Phone: +31 40 2743325 or 2742877
- Fax: +31 40 2742630
- ___________________________________________________________________________
-